import request from '@/untils/request'

//获取文章分类
export const artChannelsrService = () => {
    return request.get('/my/cate/list')
}
//添加分类
export const artAddChannelService = (query) => {
    return request.post('/my/cate/add', query)
}
//编辑分类
export const artEditChannelService = (query) => {
    return request.put('/my/cate/info', query)
}
//删除分类
export const artDelChannelService = (id) => {
    return request.delete('/my/cate/del?id=' + id)
}
//获取文章列表
export const artGetListService = (params) => {
    return request.get('/my/article/list', {
        params
    })
}
//发布文章
export const artPublishService = (data) => {
    return request.post('/my/article/add', data)
}
//文章详情
export const artGetDetailService = (id) => {
    return request.get('/my/article/info', {
        params: {id}
    })
}
//编辑文章
export const artEditService = (data) => {
    return request.put('/my/article/info',data)
}
//文章删除
export const artDelService = (id) => {
    return request.delete('/my/article/info',{
        params:{id}
    })
}
